import login from "../components/login";
import accountLogin from "../components/accountLogin"
import generalLogin from "../components/login/generalLogin"
import quickLogon from "../components/login/quickLogon"
import selectRole from "../components/login/selectRole"
import order from "../components/order"
import orderDetail from "../components/order/orderDetail"
import orderBasic from "../components/order/orderBasic"
import orderImage from "../components/order/orderImage"
import mechat from "../components/merchat"
import mechatDetail from "../components/merchat/mechatDetail"
import mine from "../components/mine"
import data from "../components/data"
import personal from '../components/personal'
import repaymentplan from '../components/repaymentplan'
import overduecollection from '../components/overduecollection'
import orderPrepayment from '../components/order/orderPrepayment'
import overdueDetail from '../components/overDue/overdueDetail'


const routes = [
    {
        path: '/',
        redirect: "/login"
    },

    {
        path: "/login",
        component: login
    },
    {
        path: '/selectRole', //选择角色
        component: selectRole
    },
    {
        path: "/accountLogin",
        component: accountLogin,
        children: [
            {
                path: "generalLogin", //普通登录
                component: generalLogin
            },
            {
                path: 'quickLogon', //快速登录
                component: quickLogon
            }
        ]
    },
    {
        path: "/order", //订单
        component: order
    },
    {
        path: '/mechat', //商户
        component: mechat,
    },
    {
        path: '/mine', //我的
        component: mine,
    },
    {
        path: '/data', //数据
        component: data
    },
    {
        path: '/mechat/:store_no',
        component: mechatDetail
    },
    {
        path: '/order/:contract_no',//订单详情
        component: orderDetail,
        redirect: '/order/:contract_no/orderBasic',
        children: [
            {
                path: 'orderBasic',
                component: orderBasic
            },
            {
                path: 'orderImage',
                component: orderImage
            },
            {
                path: 'orderPrepayment',
                component: orderPrepayment
            }

        ]
    },
    {
        path: '/order/uncommitted/:oid',//未提交合同详情
        component: orderDetail,
        redirect: '/order/uncommitted/:oid/orderBasic',
        children: [
            {
                path: 'orderBasic',
                component: orderBasic
            },
            {
                path: 'orderImage',
                component: orderImage
            },
            {
                path: 'orderPrepayment',
                component: orderPrepayment
            }

        ]
    },
    {
        path: '/personal',
        component: personal
    },
    {
        path: '/repaymentplan',
        component: repaymentplan
    },
    {
        path: '/overduecollection',
        component: overduecollection
    },
    {
        path: '/overdue/overdueDetail/:contractNo',
        component: overdueDetail
    },

]

export default routes

